package cn.easier.activity.console.service.impl;

import cn.easier.activity.console.repository.ActivityLabelRepository;
import cn.easier.activity.console.service.ActivityLabelService;
import cn.easier.activity.web.entity.ActivityLabel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 标签ServiceImpl
 */
@Service
@Transactional
public class ActivityLabelServiceImpl implements ActivityLabelService {

    Logger logger = LoggerFactory.getLogger(ActivityLabelServiceImpl.class);

    @Autowired
    ActivityLabelRepository activityLabelRepository;

    @Override
    public List<ActivityLabel> findAll() {
        return activityLabelRepository.findAllOrderBySort();
    }

    @Override
    public List<ActivityLabel> findParents() {
        return activityLabelRepository.findParents();
    }
}
